<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/storageBatch/list" method="get">
	<input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}" />
	<input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}" />
	<input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}" />
	<table class="table table-striped table-bordered table-condensed">
		<tr align="center">
			<th>
				商品名称
				<y:search fieldType="S" fieldList="marchandise.name" matchType="LIKE" className="input-medium search-query" />
				<button class="btn btn-small" onclick="search()" type="button">
					<i class="icon-search"></i>
					搜索
				</button>
				<a href="${ctx}/adoms/storageBatch/new" class="btn btn-small right">新增入库单</a>
				<a class="btn btn-small btn-primary" href="${ctx}/adoms/storageBatch/inStorage">开始入库</a>
			</th>
		</tr>
	</table>
</form>
<table class="table table-striped table-bordered table-condensed">
	<thead>
		<tr>
			<th>#</th>
			<th>
				<a href="javascript:sort('batchCode')">编号</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">商品名称</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">商品规格</a>
			</th>
			<th>
				<a href="javascript:sort('department')">所属部门</a>
			</th>
			<th align="center">
				<a href="javascript:sort('produceDate')">生产日期</a>
			</th>
			<th align="center">
				<a href="javascript:sort('numOfBox')">完成数/应入库件数</a>
			</th>
			<th align="center">
				<a href="javascript:sort('numOfMarchandise')">完成数/应入库商品数量</a>
			</th>
			<th align="center">
				<a href="javascript:sort('state')">状态</a>
			</th>
			<th>创建时间</th>
			<th align="center">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="entity" items="${pageData.result}" varStatus="index">
			<tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
				<td>${index.index + 1}</td>
				<td>${entity.batchCode}</td>
				<td>${entity.marchandise.name}</td>
				<td>${entity.marchandise.spcification}</td>
				<td>${entity.department.name}</td>
				<td align="center">
					<fmt:formatDate value="${entity.produceDate}" pattern="yyyy-MM-dd" />
				</td>
				<td align="center">
					<span class="tRed">${entity.numOfBoxHasDone}</span>
					/
					<span class="tBlue">${entity.numOfBox}</span>
				</td>
				<td align="center">
					<span class="tRed">${entity.numOfMarchandiseHasDone}</span>
					/
					<span class="tBlue">${entity.numOfMarchandise}</span>
				</td>
				<td align="center">${entity.state}</td>
				<td>${entity.insertTime}</td>
				<td align="center">
					<c:if test="${entity.state == '总代待扫描' }">
						<a href="${ctx}/adoms/storageBatch/delete/${entity.id}" confirm="删除后无法恢复,确定要删除吗?">刪除</a>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		<c:if test="${fn:length(pageData.result) == 0 }">
			<tr>
				<td colspan="11">暂无数据...</td>
			</tr>
		</c:if>
	</tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp"%>